package com.ocom.mqsimple.business.fysms.impl;



import com.ocom.mqsimple.business.fysms.FySmsProductService;
import com.ocom.mqsimple.utils.AccessRabbitProductUitl;
import com.ocom.mqsimple.utils.FySmsRabbitProductUitl;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Service
public class FySmsProductServiceImpl implements FySmsProductService {
	private Logger log = LoggerFactory.getLogger(FySmsProductServiceImpl.class);


	@Autowired
	private FySmsRabbitProductUitl fySmsRabbitProductUitl;

	/**
	 * 发送短信消息
	 */
	@Transactional
	public void FySms(String msg) {

		log.info("发送短信消息开始【{}】",msg);
		//消息队列调用减库存接口  优先级越高越先执行完
		fySmsRabbitProductUitl.FySms(msg,10);
		log.info("发送短信消息完成【{}】",msg);

	}
}
